package com.javaweb.blogcite.util;

import org.springframework.beans.factory.annotation.Value;

import java.util.ArrayList;

public class AvatarUtil {
    private static String ALI_DOMAIN = "https://tsycheese.oss-cn-guangzhou.aliyuncs.com";
    public static String getAvatar() {
        ArrayList<String> avatars = new ArrayList<>();
        avatars.add(ALI_DOMAIN + "/res/666.png");
        avatars.add(ALI_DOMAIN + "/res/fire.gif");
        avatars.add(ALI_DOMAIN + "/res/happy.gif");
        avatars.add(ALI_DOMAIN + "/res/miao.png");
        avatars.add(ALI_DOMAIN + "/res/rainbow.gif");
        avatars.add(ALI_DOMAIN + "/res/scare.gif");
        avatars.add(ALI_DOMAIN + "/res/whatthat.png");
        avatars.add(ALI_DOMAIN + "/res/yeah.png");
        int size = avatars.size();
        int random = (int) (Math.random() * size);
        return avatars.get(random);
    }
}
